package com.bwie.es.feign;

import com.bwie.common.domain.request.ProductRequest;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class FusingProductEs implements FallbackFactory<ShowFeignController> {
    @Override
    public ShowFeignController create(Throwable cause) {
        return new ShowFeignController() {
            @Override
            public Result<List<ProductRequest>> showAll() {
                return Result.error("网络异常=====>>>>>");
            }
        };
    }
}
